package day16.晚间练习.广播;

import java.io.IOException;
import java.net.*;

public class ClientDemo {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds=new DatagramSocket();
        String s="你好，广播";
        byte[] bytes=s.getBytes();
        InetAddress address=InetAddress.getByName("255.255.255.255");
        int port=10003;
        DatagramPacket dp=new DatagramPacket(bytes, bytes.length,address,port);
        ds.send(dp);
        ds.close();
    }
}
